package com.ccrfid.rmc6.repository.business.nightPatrol;

import com.ccrfid.rmc6.entity.business.nightpatrol.NpResultEntity;
import com.ccrfid.rmc6.repository.search.SearchableRepository;
import org.springframework.data.repository.Repository;

import java.util.Date;
import java.util.List;

public interface NpResultRepository extends Repository<NpResultEntity, Long>, SearchableRepository<NpResultEntity> {

    NpResultEntity getById(Long id);

    List<NpResultEntity> getAllBy();

    boolean existsById(Long id);

    NpResultEntity save(NpResultEntity entity);

    void deleteById(Long id);

    boolean existsByGroupIdAndStartTimeBetween(Long groupId, Date startTime, Date stopTime);

    NpResultEntity getAllByGroupIdAndStartTimeBetween(Long groupId, Date startTime, Date stopTime);
}
